﻿// ===============================================================================
// DotNet.Platform 开发框架 2016 版权所有
// ===============================================================================

using System;
using DotNet.Entity;

namespace XNWebModel
{
    /// <summary>
    /// 新闻资讯
    /// </summary>
    [Table(Caption = "新闻资讯")]
    public class News
    {
        /// <summary>
        /// 主键
        /// </summary>
        [PrimaryKey(true)]
        [Column(Caption = "主键", Exported = false)]
        public int Id { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Column(Caption = "标题")]
        public string Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [Column(Caption = "内容")]
        public string Details { get; set; }

        /// <summary>
        /// 分类主键
        /// </summary>
        [Column(Caption = "分类主键")]
        public int CategoryId { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        [Column(Caption = "分类名称")]
        public string CategoryName { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        [Column(Caption = "图片")]
        public string ImageUrl { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        [Column(Caption = "审核状态")]
        public bool IsAudit { get; set; }

        /// <summary>
        /// 发布机构
        /// </summary>
        [Column(Caption = "发布机构")]
        public string CreateDepartmentName { get; set; }

        /// <summary>
        /// 发布人主键
        /// </summary>
        [Column(Caption = "发布人主键")]
        public int CreateUserId { get; set; }

        /// <summary>
        /// 发布人姓名
        /// </summary>
        [Column(Caption = "发布人姓名")]
        public string CreateUserName { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [Column(Caption = "发布时间")]
        public DateTime CreateDateTime { get; set; }

        /// <summary>
        /// 审核人主键
        /// </summary>
		[Column(Caption = "发布人主键")]
        public int ExaminedUserId { get; set; }

        /// <summary>
        /// 审核人姓名
        /// </summary>
        [Column(Caption = "发布人姓名")]
        public string ExaminedUserName { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        [Column(Caption = "发布时间")]
        public DateTime? ExaminedDateTime { get; set; }

        /// <summary>
        /// 来源
        /// </summary>
        [Column(Caption = "来源")]
        public string Source { get; set; }

        /// <summary>
        /// 网站显示
        /// </summary>
		[Column(Caption = "网站显示")]
        public bool IsWeb { get; set; }

        /// <summary>
        /// 微信显示
        /// </summary>
		[Column(Caption = "微信显示")]
        public bool IsWeiXin { get; set; }

        /// <summary>
        /// App显示
        /// </summary>
        [Column(Caption = "App显示")]
        public bool IsApp { get; set; }

        /// <summary>
        /// 来源ID
        /// </summary>
		[Column(Caption = "来源ID")]
        public int SourceId { get; set; }

        /// <summary>
        /// 网络来源
        /// </summary>
		[Column(Caption = "网络来源")]
        public string FromUrl { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public News Clone()
        {
            return (News)this.MemberwiseClone();
        }
    }
}